import InterfaceProxy from 'src/utils/mider'
import { defaultOptions } from './_options'

/**
 * 数据信息接口
 * @namespace iInfo
 */

/** @lends iInfo# */
const interfaceOpt = {
  weather: {
    url: '/p/v1/info-api/weather',
    method: 'get'
  },
  city: {
    url: '/p/v1/info-api/city',
    method: 'get',
    params: {
      cityCode: String
    },
    validTime: 3600 * 24
  }
}

/** @mixes iInfo */
const iInfo = new InterfaceProxy(interfaceOpt, [defaultOptions])

export default iInfo
